package org.rcy.framework.security.encrypt;

import java.util.Base64;

public class Base64Utils {
    public static final String ENCODING = "UTF-8";

    public Base64Utils() {
    }

    public static byte[] decode(String base64) throws Exception {
        return Base64.getDecoder().decode(base64.getBytes());
    }

    public static String encode(byte[] bytes) throws Exception {
        return new String(Base64.getEncoder().encode(bytes));
    }
}